package com.qch.rocketmq.springboot_ms_rocketmq.rocketmq.consumer;

import org.apache.rocketmq.spring.core.RocketMQTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @Author qch
 * @Date 2021/6/23
 */
@Component
public class MyProducer {
    @Autowired
    private RocketMQTemplate rocketMQTemplate;

    public void sendMessage(String message) {
        rocketMQTemplate.syncSend(
                "tp_goods_order",
                message);
    }

}
